$(function () {
    $('#grid .AnswerStatus').each(function () {
        if ($(this).html() == "Not Answered") {
            $(this).parents("tr:first").addClass("NotAnswered");
        }

        if ($(this).html() == "Cannot Answered") {
            $(this).parents("tr:first").addClass("CantAnswered");
        }

        if ($(this).html() == "Right Answered") {
            $(this).parents("tr:first").addClass("RightAnswered");
        }
        if ($(this).html() == "Wrong Answered") {
            $(this).parents("tr:first").addClass("WrongAnswered");
        }
    });
});

$(function () {
    $('#AnswerStatus').each(function () {
        var value = $('#AnswerStatus').html().trim();

        if (value == "Not Answered") {
            $(this).addClass("NotAnswered");
        }

        if (value == "Cannot Answered") {
            $(this).addClass("CantAnswered");
        }

        if (value == "Right Answered") {
            $(this).addClass("RightAnswered");
        }

        if (value == "Wrong Answered") {
            $(this).addClass("WrongAnswered");
        }
    });
});